package com.yi.mall.common.config;

import com.yi.mall.common.Interceptor.AuthorizationInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class MyMvcConfig implements WebMvcConfigurer {
    /**
     * 注册拦截器，可以注册多个拦截器
     * @param registry
     */
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(new AuthorizationInterceptor())
//                .addPathPatterns("/**") // 拦截所有地址
//                .excludePathPatterns("/login","/user/register","/test/**","/goods/**");// 排除拦截
//    }
}

